﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class LayerButton : MonoBehaviour 
{
    public UnityEngine.UI.Toggle temperature;
    public UnityEngine.UI.Toggle gasp;
    public UnityEngine.UI.Toggle o2;
    public UnityEngine.UI.Toggle pm10;
    public UnityEngine.UI.Toggle Total;

	// Use this for initialization
	void Start () 
    {
		
	}
	
	// Update is called once per frame
	void Update () 
    {
		
	}


    public void OpenLayerView(bool isON)
    {
        isON = Total.isOn;
        if (isON)
        {
            LayerMesh.SetDataytype(LayerMesh.DataType.None);
        }
    }

    public void ShowTemperatrue(bool isON)
    {
        isON = temperature.isOn;
        if(isON)
        {
            LayerMesh.SetDataytype(LayerMesh.DataType.Temperature);
        }
    }

    public void ShowGasPressure(bool isON)
    {
        isON = gasp.isOn;
        if (isON)
        {
            LayerMesh.SetDataytype(LayerMesh.DataType.GasPressure);
        }
    }

    public void ShowO2(bool isON)
    {
        isON = o2.isOn;
        if (isON)
        {
            LayerMesh.SetDataytype(LayerMesh.DataType.O2);
        }

    }

    public void ShowPM10(bool isON)
    {
        isON = pm10.isOn;
        if (isON)
        {
            LayerMesh.SetDataytype(LayerMesh.DataType.PM10);
        }

    }

}
